package com.helmlabs.grouper.finance;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class FinanceApplicationContext {
	
	private static FinanceApplicationContext instance;
	private static ApplicationContext context;

	private FinanceApplicationContext(ApplicationContext context){
		this.context = context;
	}
	
	public static FinanceApplicationContext getInstance(){
		if (instance==null){
			instance = new FinanceApplicationContext(new ClassPathXmlApplicationContext("applicationContext-finance.xml"));
		}
		
		return instance;
	}
	
	public Object getBean(String name){
		return context.getBean(name);
	}


}
